
package com.jiuqi.irs.generator.form;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbMainproof.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbMainproofForm"
 */
public class TbMainproofForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _proofId = null;
   private java.lang.String _proofTotalname = null;
   private java.lang.String _proofState = null;
   private java.lang.String _proofYear = null;
   private java.lang.String _nameNumber = null;
   private java.lang.String _proofCode = null;
   private java.lang.String _orgCode = null;
   private java.lang.String _orgTitle = null;
   private java.lang.String _orgName = null;
   private java.lang.String _payType = null;
   private java.lang.String _payeeName = null;
   private java.lang.String _payeeBank = null;
   private java.lang.String _payeeAccount = null;
   private java.lang.String _payerName = null;
   private java.lang.String _payerBank = null;
   private java.lang.String _payerAccount = null;
   private java.lang.String _bankId = null;
   private java.lang.String _remark = null;
   private java.lang.String _currency = null;
   private java.math.BigDecimal _totalSum = null;
   private java.lang.String _isVoidFlag = null;
   private java.sql.Timestamp _voidTime = null;
   private java.lang.String _operator = null;
   private java.lang.String _isPrintedFlag = null;
   private java.sql.Timestamp _printDatetime = null;
   private java.lang.String _printMan = null;
   private java.lang.String _drawer = null;
   private java.sql.Timestamp _drawDate = null;
   private java.lang.String _isAdviceFlag = null;
   private java.lang.String _adviceMan = null;
   private java.sql.Timestamp _adviceDate = null;
   private java.lang.String _tranFalg = null;
   private java.lang.String _payeeFalg = null;
   private java.lang.String _billCheckCode = null;
   private java.lang.String _billType = null;
   private java.lang.String _isJkConfirm = null;
   private java.lang.String _isKhConfirm = null;
   private java.lang.String _orgGuid = null;
   private java.lang.String _remitTime = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   
   private java.lang.String itemCard = null;
   private java.math.BigDecimal itemMoney = null;
   
   
   public java.lang.String getItemCard() {
	   return itemCard;
   }

   public void setItemCard(java.lang.String itemCard) {
	   this.itemCard = itemCard;
   }

   public java.math.BigDecimal getItemMoney() {
	   return itemMoney;
   }

   public void setItemMoney(java.math.BigDecimal itemMoney) {
	   this.itemMoney = itemMoney;
   }

/**
    * Standard constructor.
    */
   public TbMainproofForm() {
   }

   /**
    * Returns the proofId
    *
    * @return the proofId
    */
   public java.lang.String getProofId() {
      return _proofId;
   }

   /**
    * Sets the proofId
    *
    * @param proofId the new proofId value
    */
   public void setProofId(java.lang.String proofId) {
      _proofId = proofId;
   }
   /**
    * Returns the proofTotalname
    *
    * @return the proofTotalname
    */
   public java.lang.String getProofTotalname() {
      return _proofTotalname;
   }

   /**
    * Sets the proofTotalname
    *
    * @param proofTotalname the new proofTotalname value
    */
   public void setProofTotalname(java.lang.String proofTotalname) {
      _proofTotalname = proofTotalname;
   }
   /**
    * Returns the proofState
    *
    * @return the proofState
    */
   public java.lang.String getProofState() {
      return _proofState;
   }

   /**
    * Sets the proofState
    *
    * @param proofState the new proofState value
    */
   public void setProofState(java.lang.String proofState) {
      _proofState = proofState;
   }
   /**
    * Returns the proofYear
    *
    * @return the proofYear
    */
   public java.lang.String getProofYear() {
      return _proofYear;
   }

   /**
    * Sets the proofYear
    *
    * @param proofYear the new proofYear value
    */
   public void setProofYear(java.lang.String proofYear) {
      _proofYear = proofYear;
   }
   /**
    * Returns the nameNumber
    *
    * @return the nameNumber
    */
   public java.lang.String getNameNumber() {
      return _nameNumber;
   }

   /**
    * Sets the nameNumber
    *
    * @param nameNumber the new nameNumber value
    */
   public void setNameNumber(java.lang.String nameNumber) {
      _nameNumber = nameNumber;
   }
   /**
    * Returns the proofCode
    *
    * @return the proofCode
    */
   public java.lang.String getProofCode() {
      return _proofCode;
   }

   /**
    * Sets the proofCode
    *
    * @param proofCode the new proofCode value
    */
   public void setProofCode(java.lang.String proofCode) {
      _proofCode = proofCode;
   }
   /**
    * Returns the orgCode
    *
    * @return the orgCode
    */
   public java.lang.String getOrgCode() {
      return _orgCode;
   }

   /**
    * Sets the orgCode
    *
    * @param orgCode the new orgCode value
    */
   public void setOrgCode(java.lang.String orgCode) {
      _orgCode = orgCode;
   }
   /**
    * Returns the orgTitle
    *
    * @return the orgTitle
    */
   public java.lang.String getOrgTitle() {
      return _orgTitle;
   }

   /**
    * Sets the orgTitle
    *
    * @param orgTitle the new orgTitle value
    */
   public void setOrgTitle(java.lang.String orgTitle) {
      _orgTitle = orgTitle;
   }
   /**
    * Returns the orgName
    *
    * @return the orgName
    */
   public java.lang.String getOrgName() {
      return _orgName;
   }

   /**
    * Sets the orgName
    *
    * @param orgName the new orgName value
    */
   public void setOrgName(java.lang.String orgName) {
      _orgName = orgName;
   }
   /**
    * Returns the payType
    *
    * @return the payType
    */
   public java.lang.String getPayType() {
      return _payType;
   }

   /**
    * Sets the payType
    *
    * @param payType the new payType value
    */
   public void setPayType(java.lang.String payType) {
      _payType = payType;
   }
   /**
    * Returns the payeeName
    *
    * @return the payeeName
    */
   public java.lang.String getPayeeName() {
      return _payeeName;
   }

   /**
    * Sets the payeeName
    *
    * @param payeeName the new payeeName value
    */
   public void setPayeeName(java.lang.String payeeName) {
      _payeeName = payeeName;
   }
   /**
    * Returns the payeeBank
    *
    * @return the payeeBank
    */
   public java.lang.String getPayeeBank() {
      return _payeeBank;
   }

   /**
    * Sets the payeeBank
    *
    * @param payeeBank the new payeeBank value
    */
   public void setPayeeBank(java.lang.String payeeBank) {
      _payeeBank = payeeBank;
   }
   /**
    * Returns the payeeAccount
    *
    * @return the payeeAccount
    */
   public java.lang.String getPayeeAccount() {
      return _payeeAccount;
   }

   /**
    * Sets the payeeAccount
    *
    * @param payeeAccount the new payeeAccount value
    */
   public void setPayeeAccount(java.lang.String payeeAccount) {
      _payeeAccount = payeeAccount;
   }
   /**
    * Returns the payerName
    *
    * @return the payerName
    */
   public java.lang.String getPayerName() {
      return _payerName;
   }

   /**
    * Sets the payerName
    *
    * @param payerName the new payerName value
    */
   public void setPayerName(java.lang.String payerName) {
      _payerName = payerName;
   }
   /**
    * Returns the payerBank
    *
    * @return the payerBank
    */
   public java.lang.String getPayerBank() {
      return _payerBank;
   }

   /**
    * Sets the payerBank
    *
    * @param payerBank the new payerBank value
    */
   public void setPayerBank(java.lang.String payerBank) {
      _payerBank = payerBank;
   }
   /**
    * Returns the payerAccount
    *
    * @return the payerAccount
    */
   public java.lang.String getPayerAccount() {
      return _payerAccount;
   }

   /**
    * Sets the payerAccount
    *
    * @param payerAccount the new payerAccount value
    */
   public void setPayerAccount(java.lang.String payerAccount) {
      _payerAccount = payerAccount;
   }
   /**
    * Returns the bankId
    *
    * @return the bankId
    */
   public java.lang.String getBankId() {
      return _bankId;
   }

   /**
    * Sets the bankId
    *
    * @param bankId the new bankId value
    */
   public void setBankId(java.lang.String bankId) {
      _bankId = bankId;
   }
   /**
    * Returns the remark
    *
    * @return the remark
    */
   public java.lang.String getRemark() {
      return _remark;
   }

   /**
    * Sets the remark
    *
    * @param remark the new remark value
    */
   public void setRemark(java.lang.String remark) {
      _remark = remark;
   }
   /**
    * Returns the currency
    *
    * @return the currency
    */
   public java.lang.String getCurrency() {
      return _currency;
   }

   /**
    * Sets the currency
    *
    * @param currency the new currency value
    */
   public void setCurrency(java.lang.String currency) {
      _currency = currency;
   }
   /**
    * Returns the totalSum
    *
    * @return the totalSum
    */
   public java.math.BigDecimal getTotalSum() {
      return _totalSum;
   }

   /**
    * Sets the totalSum
    *
    * @param totalSum the new totalSum value
    */
   public void setTotalSum(java.math.BigDecimal totalSum) {
      _totalSum = totalSum;
   }
   /**
    * Returns the isVoidFlag
    *
    * @return the isVoidFlag
    */
   public java.lang.String getIsVoidFlag() {
      return _isVoidFlag;
   }

   /**
    * Sets the isVoidFlag
    *
    * @param isVoidFlag the new isVoidFlag value
    */
   public void setIsVoidFlag(java.lang.String isVoidFlag) {
      _isVoidFlag = isVoidFlag;
   }
   /**
    * Returns the voidTime
    *
    * @return the voidTime
    */
   public java.sql.Timestamp getVoidTime() {
      return _voidTime;
   }

   /**
    * Returns the voidTime as a String
    *
    * @return the voidTime as a String
    */
   public String getVoidTimeAsString() {
      if( _voidTime != null ) {
         return FORMAT.format(_voidTime);
      }
      else {
         return "";
      }
   }

   /**
    * Sets the voidTime
    *
    * @param voidTime the new voidTime value
    */
   public void setVoidTime(java.sql.Timestamp voidTime) {
      _voidTime = voidTime;
   }

   /**
    * Sets the voidTime as a String.
    *
    * @param voidTime the new voidTime value as a String
    */
   public void setVoidTimeAsString(String voidTime) {
      try {
         _voidTime = new java.sql.Timestamp(FORMAT.parse(voidTime).getTime());
      } catch (ParseException pe) {
         _voidTime = new java.sql.Timestamp((new java.util.Date()).getTime());
      }
   }

   /**
    * Returns the operator
    *
    * @return the operator
    */
   public java.lang.String getOperator() {
      return _operator;
   }

   /**
    * Sets the operator
    *
    * @param operator the new operator value
    */
   public void setOperator(java.lang.String operator) {
      _operator = operator;
   }
   /**
    * Returns the isPrintedFlag
    *
    * @return the isPrintedFlag
    */
   public java.lang.String getIsPrintedFlag() {
      return _isPrintedFlag;
   }

   /**
    * Sets the isPrintedFlag
    *
    * @param isPrintedFlag the new isPrintedFlag value
    */
   public void setIsPrintedFlag(java.lang.String isPrintedFlag) {
      _isPrintedFlag = isPrintedFlag;
   }
   /**
    * Returns the printDatetime
    *
    * @return the printDatetime
    */
   public java.sql.Timestamp getPrintDatetime() {
      return _printDatetime;
   }

   /**
    * Returns the printDatetime as a String
    *
    * @return the printDatetime as a String
    */
   public String getPrintDatetimeAsString() {
      if( _printDatetime != null ) {
         return FORMAT.format(_printDatetime);
      }
      else {
         return "";
      }
   }

   /**
    * Sets the printDatetime
    *
    * @param printDatetime the new printDatetime value
    */
   public void setPrintDatetime(java.sql.Timestamp printDatetime) {
      _printDatetime = printDatetime;
   }

   /**
    * Sets the printDatetime as a String.
    *
    * @param printDatetime the new printDatetime value as a String
    */
   public void setPrintDatetimeAsString(String printDatetime) {
      try {
         _printDatetime = new java.sql.Timestamp(FORMAT.parse(printDatetime).getTime());
      } catch (ParseException pe) {
         _printDatetime = new java.sql.Timestamp((new java.util.Date()).getTime());
      }
   }

   /**
    * Returns the printMan
    *
    * @return the printMan
    */
   public java.lang.String getPrintMan() {
      return _printMan;
   }

   /**
    * Sets the printMan
    *
    * @param printMan the new printMan value
    */
   public void setPrintMan(java.lang.String printMan) {
      _printMan = printMan;
   }
   /**
    * Returns the drawer
    *
    * @return the drawer
    */
   public java.lang.String getDrawer() {
      return _drawer;
   }

   /**
    * Sets the drawer
    *
    * @param drawer the new drawer value
    */
   public void setDrawer(java.lang.String drawer) {
      _drawer = drawer;
   }
   /**
    * Returns the drawDate
    *
    * @return the drawDate
    */
   public java.sql.Timestamp getDrawDate() {
      return _drawDate;
   }

   /**
    * Returns the drawDate as a String
    *
    * @return the drawDate as a String
    */
   public String getDrawDateAsString() {
      if( _drawDate != null ) {
         return FORMAT.format(_drawDate);
      }
      else {
         return "";
      }
   }

   /**
    * Sets the drawDate
    *
    * @param drawDate the new drawDate value
    */
   public void setDrawDate(java.sql.Timestamp drawDate) {
      _drawDate = drawDate;
   }

   /**
    * Sets the drawDate as a String.
    *
    * @param drawDate the new drawDate value as a String
    */
   public void setDrawDateAsString(String drawDate) {
      try {
         _drawDate = new java.sql.Timestamp(FORMAT.parse(drawDate).getTime());
      } catch (ParseException pe) {
         _drawDate = new java.sql.Timestamp((new java.util.Date()).getTime());
      }
   }

   /**
    * Returns the isAdviceFlag
    *
    * @return the isAdviceFlag
    */
   public java.lang.String getIsAdviceFlag() {
      return _isAdviceFlag;
   }

   /**
    * Sets the isAdviceFlag
    *
    * @param isAdviceFlag the new isAdviceFlag value
    */
   public void setIsAdviceFlag(java.lang.String isAdviceFlag) {
      _isAdviceFlag = isAdviceFlag;
   }
   /**
    * Returns the adviceMan
    *
    * @return the adviceMan
    */
   public java.lang.String getAdviceMan() {
      return _adviceMan;
   }

   /**
    * Sets the adviceMan
    *
    * @param adviceMan the new adviceMan value
    */
   public void setAdviceMan(java.lang.String adviceMan) {
      _adviceMan = adviceMan;
   }
   /**
    * Returns the adviceDate
    *
    * @return the adviceDate
    */
   public java.sql.Timestamp getAdviceDate() {
      return _adviceDate;
   }

   /**
    * Returns the adviceDate as a String
    *
    * @return the adviceDate as a String
    */
   public String getAdviceDateAsString() {
      if( _adviceDate != null ) {
         return FORMAT.format(_adviceDate);
      }
      else {
         return "";
      }
   }

   /**
    * Sets the adviceDate
    *
    * @param adviceDate the new adviceDate value
    */
   public void setAdviceDate(java.sql.Timestamp adviceDate) {
      _adviceDate = adviceDate;
   }

   /**
    * Sets the adviceDate as a String.
    *
    * @param adviceDate the new adviceDate value as a String
    */
   public void setAdviceDateAsString(String adviceDate) {
      try {
         _adviceDate = new java.sql.Timestamp(FORMAT.parse(adviceDate).getTime());
      } catch (ParseException pe) {
         _adviceDate = new java.sql.Timestamp((new java.util.Date()).getTime());
      }
   }

   /**
    * Returns the tranFalg
    *
    * @return the tranFalg
    */
   public java.lang.String getTranFalg() {
      return _tranFalg;
   }

   /**
    * Sets the tranFalg
    *
    * @param tranFalg the new tranFalg value
    */
   public void setTranFalg(java.lang.String tranFalg) {
      _tranFalg = tranFalg;
   }
   /**
    * Returns the payeeFalg
    *
    * @return the payeeFalg
    */
   public java.lang.String getPayeeFalg() {
      return _payeeFalg;
   }

   /**
    * Sets the payeeFalg
    *
    * @param payeeFalg the new payeeFalg value
    */
   public void setPayeeFalg(java.lang.String payeeFalg) {
      _payeeFalg = payeeFalg;
   }
   /**
    * Returns the billCheckCode
    *
    * @return the billCheckCode
    */
   public java.lang.String getBillCheckCode() {
      return _billCheckCode;
   }

   /**
    * Sets the billCheckCode
    *
    * @param billCheckCode the new billCheckCode value
    */
   public void setBillCheckCode(java.lang.String billCheckCode) {
      _billCheckCode = billCheckCode;
   }
   /**
    * Returns the billType
    *
    * @return the billType
    */
   public java.lang.String getBillType() {
      return _billType;
   }

   /**
    * Sets the billType
    *
    * @param billType the new billType value
    */
   public void setBillType(java.lang.String billType) {
      _billType = billType;
   }
   /**
    * Returns the isJkConfirm
    *
    * @return the isJkConfirm
    */
   public java.lang.String getIsJkConfirm() {
      return _isJkConfirm;
   }

   /**
    * Sets the isJkConfirm
    *
    * @param isJkConfirm the new isJkConfirm value
    */
   public void setIsJkConfirm(java.lang.String isJkConfirm) {
      _isJkConfirm = isJkConfirm;
   }
   /**
    * Returns the isKhConfirm
    *
    * @return the isKhConfirm
    */
   public java.lang.String getIsKhConfirm() {
      return _isKhConfirm;
   }

   /**
    * Sets the isKhConfirm
    *
    * @param isKhConfirm the new isKhConfirm value
    */
   public void setIsKhConfirm(java.lang.String isKhConfirm) {
      _isKhConfirm = isKhConfirm;
   }
   /**
    * Returns the orgGuid
    *
    * @return the orgGuid
    */
   public java.lang.String getOrgGuid() {
      return _orgGuid;
   }

   /**
    * Sets the orgGuid
    *
    * @param orgGuid the new orgGuid value
    */
   public void setOrgGuid(java.lang.String orgGuid) {
      _orgGuid = orgGuid;
   }
   /**
    * Returns the remitTime
    *
    * @return the remitTime
    */
   public java.lang.String getRemitTime() {
      return _remitTime;
   }

   /**
    * Sets the remitTime
    *
    * @param remitTime the new remitTime value
    */
   public void setRemitTime(java.lang.String remitTime) {
      _remitTime = remitTime;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getProofId() == null) {
         errors.add("proofId", new ActionError("error.proofId.required"));
      }
      if(getIsJkConfirm() == null) {
         errors.add("isJkConfirm", new ActionError("error.isJkConfirm.required"));
      }
      if(getIsKhConfirm() == null) {
         errors.add("isKhConfirm", new ActionError("error.isKhConfirm.required"));
      }
      // TODO test format/data
      return errors;
   }
}
